import Cookies from 'js-cookie'

const TokenKey = 'mericama_token'
const UserId = 'userId'
const TimeKey = 'mericama_time'
const Cid = 'your_cid_key';
const Mid = 'mid'

// 获取token
export function getToken() {
  return Cookies.get(TokenKey)
}
// 设置token
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
// 删除token
export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 获取userid
export function getUserId() {
  return Cookies.get(UserId)
}

// 设置userid
export function setUserId(userid) {
  return Cookies.set(UserId, userid)
}

// 删除userid
export function removeUserId() {
  return Cookies.remove(UserId)
}


// 获取cid
export function getCid() {
  return Cookies.get(Cid);
}

// 设置cid
export function setCid(cid) {
  return Cookies.set(Cid, cid)
}

// 删除userid
export function removeCid() {
  return Cookies.remove(Cid)
}


// 获取时间戳
export function getTimeStamp() {
  return Cookies.get(TimeKey)
}

// 设置时间戳
export function setTimeStamp() {
  return Cookies.set(TimeKey, Date.now())
}
// 设置语种
export function setLang(language) {
  return Cookies.set('language', language)
}

// 设置token
export function setMid(mid) {
  return Cookies.set(Mid, mid)
}

// 获取mid
export function getMid() {
  return Cookies.get(Mid)
}

